<? 
include_once("codelibrary/inc/variables.php");
include_once("session.php");
include_once("codelibrary/inc/functions.php");
//include_once("database.php");
$business_id = $_SESSION['business_id'];

//$getData = getAnyTableWhereData($business_info_table," and business_id='$business_id'");

if(isset($_REQUEST['Submit']))
{
     $companyname = $_REQUEST['companyname'];
	 $locationname = $_REQUEST['locationname'];
	 $address = $_REQUEST['address'];
	 $city = $_REQUEST['city'];
	 $state = $_REQUEST['state'];
	 $zipcode = $_REQUEST['zipcode'];
	 $country = $_REQUEST['country'];
	 $phonenumber = $_REQUEST['phonenumber'];
	 $altphonenumber = $_REQUEST['altphonenumber'];
	 $faxnumber = $_REQUEST['faxnumber'];
	 $fname = $_REQUEST['firstname'];
	 $lname = $_REQUEST['lastname'];
	 $email = $_REQUEST['email'];
	 $webaddress = $_REQUEST['webaddress'];
	 $directions = $_REQUEST['directions'];
	 $timezone = $_REQUEST['timezone'];
	 
	 mysql_query("update $business_info_table set companyname = '".$companyname."', locationname = '".$locationname."', address = '".$address."', city = '".$city."', state = '".$state."', zipcode = '".$zipcode."', country = '".$country."', phonenumber = '".$phonenumber."', altphonenumber = '".$altphonenumber."', faxnumber = '".$faxnumber."', firstname = '".$fname."', lastname = '".$lname."', email = '".$email."', webaddress = '".$webaddress."', directions = '".$directions."', timezone = '".$timezone."' where business_id = '".$business_id."'");
	 
	 header("Location: company-location-details.php?msg=1");
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Online Appointment</title>

<base >
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<title>Staff Management</title>

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">


<table cellpadding="0" cellspacing="0" border="0"><tr>
  <td style="background:url(images/top.gif) repeat-x top; ">
<table cellpadding="0" cellspacing="0" border="0" style="width:764px" align="center"> 
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" border="0" style="height:57">
				<tr>
					<td height="57">
<? html_header(); ?>					</td>
				</tr>
			</table>


		</td>
	</tr>
	<tr>
		<td>





<table border="0" width="105%" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" class="col_left">

<table border="0"cellspacing="0" cellpadding="0" class="box_width_left">
	<tr><td width="100%">
		<table border="0" cellspacing="0" cellpadding="0">
<tr><td>

<table border="0" width="100%" cellspacing="0" cellpadding="0" class="">
  <tr>
    <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="0"  class="" height="91">
  <tr>
    <td align="center" height="91">
    <img border="0" src="images/logo.jpg" width="208" height="86"></td>
  </tr>
</table>
</td>
  </tr>
</table>
</td></tr>


          <tr>
            <td>
<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="box_header_txt" height="48">
  <tr>
    <td style="background-image: url(images/1_bg2-2.gif)" height="1">
      <p style="margin-top: 16"> </td>
  </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"   style="border-bottom:12px solid #ffffff;">
  <tr>
    <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="0"  style="margin-bottom:0px;background:#7C7C7C url(images/1_line.gif) no-repeat left bottom;" >
  <tr>
    <td  style="padding:3px 16px 8px 25px;"><? include("link.php");?></td>
  </tr>
</table>
</td>
  </tr>
</table>
            </td>
          </tr>


          <tr>
            <td class="">&nbsp;
</td>
          </tr>

		</table>
	</td>
	<td><img src="images/spacer.gif" border="0" alt="" width="15" height="1"></td></tr>
</table>

    </td>

    <td width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="cont_header_txt">
  <tr>
    <td>
			<table border="0" cellpadding="0" cellspacing="0" bgcolor="#EAEAEA" class="cont_header_txt">
				<tr>
					<td><img src="images/1_q1.gif" border="0" alt="" width="45" height="39"></td>
					<td style="width:100%">>location information </td>
					<td><img src="images/1_q2.gif" border="0" alt="" width="10" height="39"></td>
				</tr>
			</table>										 
			</td>
  </tr>
</table>


						
						<table cellpadding="0" cellspacing="0" border="0" style="border:0px solid #DEDEDE; border-width:0px 1px 0px 1px;">
                          <tr>
                            <td style="background:#ffffff;border:0px solid #ffffff; border-width:18px 5px 10px 5px;"><!-- new_products //-->
                                <table border="0" width="" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td><form name="frm" action="" method="post" >
                                <table width="108%" border="1" cellpadding="3" cellspacing="2" bordercolor="#FFDBCA" class="table">
                                  <tr>
                                    <td width="29%" height="27" valign="bottom" class="simpletxt">&nbsp;Company Name </td>
                                    <td height="27" colspan="2" valign="top" nowrap class="smallText">
                                      <label>
                                      <input name="companyname" type="text" id="companyname" size="30" value="<?=$getData['companyname'];?>">
                                      </label></td>
                                  </tr>
                                  
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Location Name </td>
                                    <td height="27" colspan="2" valign="bottom" class="smallText"><input name="locationname" type="text" id="locationname" size="30" value="<?=$getData['locationname'];?>"></td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Address </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><label>
                                      <textarea rows="3" cols="40"><?=$getData['address'];?></textarea>
                                      </label></td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;City </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><label>
                                      <input name="city" type="text" id="city" size="30" value="<?=$getData['city'];?>">
                                      </label></td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;State </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><label>
                                      <input name="state" type="text" id="state" size="30" value="<?=$getData['state'];?>">
                                      </label></td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Zip Code </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><label>
                                      <input name="zipcode" type="text" id="zipcode" size="30" value="<? if($getData['zipcode']!=0)echo $getData['zipcode'];?>">
                                      </label></td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Country </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><div align="left">
                                          <select name="country" id="country">
                                                  <option value="" selected>[ Select Country ]</option>
                                                  <? $country = array('Afghanistan','Albania','Algeria','American Samoa','Andorra','Angola','Anguilla','Antarctica',
							   'Antigua And Barbuda','Argentina','Armenia','Aruba','Australia','Austria','Azerbaijan','Bahamas', 'The, Bahrain',
							   'Bangladesh,Barbados','Belarus','Belgium','Belize','Benin','Bermuda','Bhutan','Bolivia','Bosnia and Herzegovina',
							   'Botswana','Bouvet Island','Brazil','British Indian Ocean Territory','Brunei','Bulgaria','Burkina Faso','Burundi',
							   'Cambodia','Cameroon','Canada','Cape Verde','Cayman Islands','Central African Republic','Chad','Chile','China',
							   'Christmas Island','Cocos (Keeling) Islands','Colombia','Comoros','Congo', 'Democractic Republic of the,
							   Cook Islands','Costa Rica','Cote D\'Ivoire (Ivory Coast)','Croatia (Hrvatska)','Cuba','Cyprus','Czech Republic',
							   'Denmark','Djibouti','Dominica','Dominican Republic','East Timor','Ecuador','Egypt','El Salvador','Equatorial Guinea',
							   'Eritrea','Estonia','Ethiopia','Falkland Islands (Islas Malvinas)','Faroe Islands','Fiji Islands','Finland',
							   'France','French Guiana','French Polynesia','French Southern Territories','Gabon','Gambia, The','Georgia','Germany',
							   'Ghana','Gibraltar','Greece','Greenland','Grenada','Guadeloupe','Guam','Guatemala','Guinea','Guinea-Bissau','Guyana','Haiti',
							   'Heard and McDonald Islands','Honduras','Hong Kong S.A.R.','Hungary','Iceland','India','Indonesia','Iran','Iraq','Ireland',
							   'Israel','Italy','Jamaica','Japan','Jordan','Kazakhstan','Kenya','Kiribati','Korea','Korea, North','Kuwait','Kyrgyzstan','Laos',
							   'Latvia','Lebanon','Lesotho','Liberia','Libya','Liechtenstein','Lithuania','Luxembourg','Macau S.A.R.','Macedonia',
							   'Madagascar','Malawi','Malaysia','Maldives','Mali','Malta','Marshall Islands','Martinique','Mauritania','Mauritius','Mayotte',
							   'Mexico','Micronesia','Moldova','Monaco','Mongolia','Montserrat','Morocco','Mozambique','Myanmar','Namibia','Nauru','Nepal',
							   'Netherlands Antilles','Netherlands, The','New Caledonia','New Zealand','Nicaragua','Niger','Nigeria','Niue','Norfolk Island',
							   'Northern Mariana Islands','Norway','Oman','Pakistan','Palau','Panama','Papua new Guinea','Paraguay','Peru','Philippines',
							   'Pitcairn Island','Poland','Portugal','Puerto Rico','Qatar','Reunion','Romania','Russia','Rwanda','Saint Helena','Saint Kitts And Nevis',
							   'Saint Lucia','Saint Pierre and Miquelon','Saint Vincent And The Grenadines','Samoa','San Marino','Sao Tome and Principe','Saudi Arabia',
							   'Senegal','Seychelles','Sierra Leone','Singapore','Slovakia','Slovenia','Solomon Islands','Somalia','South Africa','South Georgia',
							   'Spain','Sri Lanka','Sudan','Suriname','Svalbard And Jan Mayen Islands','Swaziland','Sweden','Switzerland','Syria','Taiwan',
							   'Tajikistan','Tanzania','Thailand','Togo','Tokelau','Tonga','Trinidad And Tobago','Tunisia','Turkey','Turkmenistan','Turks And Caicos Islands',
							   'Tuvalu','Uganda','Ukraine','United Arab Emirates','United Kingdom','United States','United States Minor Outlying Islands','Uruguay','Uzbekistan',
							   'Vanuatu','Vatican City State (Holy See)','Venezuela','Vietnam','Virgin Islands (British)','Virgin Islands (US)','Wallis And Futuna Islands',
							   'Yemen','Yugoslavia','Zambia','Zimbabwe');
							   
							   foreach($country  as $arr_cont)
							   {
							   echo "<option value=".$arr_cont.">".$arr_cont."</option>";
							   }?>
                                          </select>
                                        </div></td>
                                  </tr>
								  <tr>
                                    <td height="30" valign="bottom" nowrap class="simpletxt">&nbsp;Phone Number</td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><input name="phonenumber" type="text" id="phonenumber" size="30" value="<? if($getData['phonenumber']!=0)echo $getData['phonenumber'];?>"></td>
                                  </tr>
								  <tr>
                                    <td height="30" valign="bottom" nowrap class="simpletxt">&nbsp;Alternate Phone Number</td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><input name="altphonenumber" type="text" id="altphonenumber" size="30" value="<? if($getData['altphonenumber']!=0)echo $getData['altphonenumber'];?>"></td>
                                  </tr>
								  <tr>
                                    <td height="30" valign="bottom" nowrap class="simpletxt">&nbsp;Fax Number</td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><input name="faxnumber" type="text" id="faxnumber" size="30" value="<? if($getData['faxnumber']!=0)echo $getData['faxnumber'];?>"></td>
                                  </tr>
								  <tr>
                                    <td height="30" valign="bottom" nowrap class="simpletxt">&nbsp;Contact First Name</td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><input name="fname" type="text" id="fname" size="30" value="<?=$getData['firstname'];?>"></td>
                                  </tr>
								  <tr>
                                    <td height="30" valign="bottom" nowrap class="simpletxt">&nbsp;Contact Last Name</td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><input name="lname" type="text" id="lname" size="30" value="<?=$getData['lastname'];?>"></td>
                                  </tr>
                                  <tr>
                                    <td height="30" valign="bottom" nowrap class="simpletxt">&nbsp;Contact Email Address</td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><input name="email" type="text" id="email" size="30" value="<?=$getData['email'];?>"></td>
                                  </tr>
                                  <tr>
                                    <td height="30" valign="bottom" nowrap class="simpletxt">&nbsp;Web Address </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><input name="webaddress" type="text" id="webaddress" size="30" value="<?=$getData['webaddress'];?>"></td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Directions </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><label>
                                      <textarea rows="3" cols="40"><?=$getData['directions'];?></textarea>
                                      </label></td>
                                  </tr>
								  <tr>
                                    <td height="30" valign="bottom" nowrap class="simpletxt">&nbsp;Time Zone </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="smallText"><SELECT name="timezone">
                        <?php

									foreach($array_time_zone_WI as $key=>$value)
																{
																  
																?>
                        <OPTION <? if($key!=0){ ?> value="<?=$value;?>" <? } ?> <? if($getData['timezone']==$value){echo "selected";}?>>
                        <?=$value;?>
                        </OPTION>
                        <?php
																}
																?>
                      </SELECT></td>
                                  </tr>
                                  <tr>
                                    <td colspan="3" align="center" valign="middle" class="smallText"><input name="Submit" type="submit" class="button" value="Update">
                                    </td>
                                  </tr>
                                </table>
                              </form></td>
                                  </tr>
                                </table>
                              <table border="0" cellspacing="0" cellpadding="0" align="center" class="box_width_cont product">
                                  <tr>
                                    <td></td>
                                  </tr>
                              </table></td>
                          </tr>
                        </table>
						
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td><img src="images/1_q4.gif" border="0" alt="" width="10" height="10"></td>
								<td style="width:100%; background-image:url(images/1_li1.gif)"></td>
								<td><img src="images/1_q3.gif" border="0" alt="" width="10" height="10"></td>
							</tr>
						</table>
						


		
		
		</td>

    <td class="col_right">

<table border="0"cellspacing="0" cellpadding="0" class="box_width_right">
	<tr><td></td>
		<td width="100%">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr><td></td></tr>
			</table>
		</td>
	</tr>
</table>


    </td>
  </tr>
</table>



		</td>
	</tr>
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" border="0" style="height:98px; background-image:url(images/bot.gif)">
				<tr>
					<td>
						<table cellpadding="0" cellspacing="0" border="0" class="footer">
							<tr>									
								<td height="77"><img src="images/spacer.gif" border="0" alt="" width="25" height="1"></td>				
								<td style="width:207px"><br style="line-height:49px"><img src="images/p1.gif" border="0" alt="" width="145" height="24"><br></td>
							  <td style="width:532px">&nbsp;</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table></td></tr></table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"></td>
  </tr>
</table>
</body>

</html>